package org.example.controller;
import org.example.domain.Student;
import org.example.service.impl.StudentServiceImpl;
import org.springframework.web.bind.annotation.*;

import org.springframework.beans.factory.annotation.Autowired;

/**
* (student)表控制层
*
* @author xxxxx
*/
@RestController
@RequestMapping("/student")
public class StudentController {
/**
* 服务对象
*/
    @Autowired
    private StudentServiceImpl studentServiceImpl;

    /**
    * 通过主键查询单条数据
    *
    * @param id 主键
    * @return 单条数据
    */
    @GetMapping("selectOne")
    public Student selectOne(Integer id) {
    return studentServiceImpl.selectByPrimaryKey(id);
    }

}
